home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / DEV / I-Z / RA.cpt / NewStrings.ra < prev    next >
Text File  |  1986-12-11  |  1KB  |  71 lines

  1. |
  2. |  RA™
  3. |  String functions
  4. |
  5. |   © 1986 COM~LINK & S.Koren
  6. |
  7. #M;
  8. "Ver 0.2 of RA now has the following!new string functions:!!"
  9. "query for string!string length!"
  10. "find substring!concatenate strings!"
  11. "insert substring!delete substring!copy substring"
  12. #A;
  13. "Enter any string : "
  14. ¿               | ask user for string
  15. A†∂
  16. "!You entered the string: " A∂ ††
  17. "!The length of the string is: " A∂ 
  18. Å !             | print the length of the string
  19. "!Enter another string: "¿
  20. B†∂
  21. "!The second string was: " B∂ †† 
  22. "!The length of the string is: " B∂ Å !"!"
  23. A∂ B∂ ◊ A:     | find position of a in b
  24. A. [A∂ "'"††"' was a substring of '" B∂ †† "'!in position " A. ! "!"]
  25. A.ß [A∂ "'"†† "' was not a substring of '" B∂ ††"'!"]
  26. A∂ B∂ 
  27. Æ              | concatenate the strings
  28.  
  29. "'" C†∂ C∂†† "' is the concatenated string.!"
  30. "Its length is " C∂Å ! "."
  31. #A;
  32. †aaaaaa† A†∂ A∂ †† " is string A!"
  33. †bbbb† B†∂ B∂ †† " is string B!"
  34. A∂ B∂ 3 †+ C†∂ C∂ †† " is string A inserted !in string B at position 3.!"
  35. C∂ 3 3 †- †† " is that string with!"
  36. "positions 3 thru 6 deleted.!"
  37. †This is a test string† A†∂
  38. A∂ ††
  39. "!"
  40. A∂ 2 7 †ç "'"††"'" " is the substring from !location 2 thru 7.!"
  41. #A;
  42. "THE END."
  43.  
  44. $
  45. &A
  46. "!Hit any key: " ?§ µ @`
  47. |
  48. |  RA title routine
  49. |
  50. &M
  51. #P,5,5;
  52. #G,10,10;
  53. #L,225,10;
  54. #L,225,105;
  55. #L,10,105;
  56. #L,10,10; 
  57. #O; #Q;`
  58.  
  59. &G 1% 2% •0A893º¶ `
  60. &L 1% 2% •0A891º¶ `
  61. &O
  62. 40 100 Ω
  63. "RA™"
  64. 60 40 Ω 
  65. "© 1986/7 COM~LINK & S.Koren" 
  66. 80 60 Ω
  67. "All rights reserved." `
  68. &P 1% 2% •0A89Bº¶ `
  69. &Q ?§ @ µ`
  70. $
  71.